-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Log previous and new value of configuration when reset/update API is called #10769
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10769 +/- ##
============================================
- Coverage 16.40% 16.40% -0.01%
- Complexity 13630 13631 +1
============================================
Files 5705 5705
Lines 503722 503738 +16
Branches 61034 61036 +2
============================================
- Hits 82647 82644 -3
- Misses 411889 411906 +17
- Partials 9186 9188 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
@blueorangutan package |
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Outdated
Show resolved
Hide resolved
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13162 |
1. Change type for scope paramter for method updateConfiguration and validateConfigurationValue 2. Standardize scope variable to be of ConfigKey type and scopeVal as string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
@blueorangutan package |
@sudo87 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13168 |
@blueorangutan test |
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code lgtm
[SF] Trillian test result (tid-13269)
|
@blueorangutan test |
@sudo87 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-13290)
|
@sudo87 changes seem to be causing some issues with configuration behaviour. Please check |
server/src/main/java/com/cloud/configuration/ConfigurationManagerImpl.java
Show resolved
Hide resolved
@blueorangutan package |
@sudo87 a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13400 |
@blueorangutan test |
@sudo87 a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
[SF] Trillian test result (tid-13326)
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
at change:
2025-05-27 13:48:28,627 DEBUG [c.c.a.ApiServlet] (qtp1390913202-20:[ctx-66866e36]) (logid:8c585b80) ===START=== 10.0.3.251 -- GET name=account.cleanup.interval&value=86401&command=updateConfiguration&response=json&sessionkey=utE1RMWP4uWKuF4-zwHxMF02YAA
2025-05-27 13:48:28,627 DEBUG [c.c.a.ApiServlet] (qtp1390913202-20:[ctx-66866e36]) (logid:8c585b80) Two factor authentication is already verified for the user 2, so skipping
2025-05-27 13:48:28,634 DEBUG [c.c.a.ApiServer] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) CIDRs from which account 'Account [{"accountName":"admin","id":2,"uuid":"a32bf6a3-3afd-11f0-928a-1e00fe0001d8"}]' is allowed to perform API calls: 0.0.0.0/0,::/0
2025-05-27 13:48:28,636 INFO [o.a.c.a.DynamicRoleBasedAPIAccessChecker] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) Account for user id a32cc71b-3afd-11f0-928a-1e00fe0001d8 is Root Admin or Domain Admin, all APIs are allowed.
2025-05-27 13:48:28,636 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
2025-05-27 13:48:28,636 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) API rate limiting is disabled. We will not use ApiRateLimitService.
2025-05-27 13:48:28,642 DEBUG [c.c.c.ConfigurationManagerImpl] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) Not proceeding with configuration [account.cleanup.interval]'s range validation, as it does not have a specified range.
2025-05-27 13:48:28,650 DEBUG [c.c.c.ConfigurationManagerImpl] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) Config: account.cleanup.interval value is updated from: 86400 to 86401 for scope: Global
2025-05-27 13:48:28,651 WARN [o.a.c.m.w.WebhookServiceImpl] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) Skipping delivering event Event {"description":"{\"details\":\" Name: account.cleanup.interval New Value: 86401\",\"event\":\"CONFIGURATION.VALUE.EDIT\",\"status\":\"Completed\"}","eventId":null,"eventType":"CONFIGURATION.VALUE.EDIT","eventUuid":null,"resourceType":"Configuration","resourceUUID":null} to any webhook as account ID is missing
2025-05-27 13:48:28,652 WARN [o.a.c.f.e.EventDistributorImpl] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) Failed to publish event [category: ActionEvent, type: CONFIGURATION.VALUE.EDIT] on bus webhookEventBus
2025-05-27 13:48:28,661 DEBUG [c.c.a.ApiServlet] (qtp1390913202-20:[ctx-66866e36, ctx-24c069b4]) (logid:8c585b80) ===END=== 10.0.3.251 -- GET name=account.cleanup.interval&value=86401&command=updateConfiguration&response=json&sessionkey=utE1RMWP4uWKuF4-zwHxMF02YAA
at reset:
2025-05-27 13:49:07,619 DEBUG [c.c.c.ConfigurationManagerImpl] (qtp1390913202-20:[ctx-8d531200, ctx-f988c6e7]) (logid:49586a24) Config: account.cleanup.interval value is updated from: 86401 to 86400 for scope: Global
2025-05-27 13:49:07,621 WARN [o.a.c.m.w.WebhookServiceImpl] (qtp1390913202-20:[ctx-8d531200, ctx-f988c6e7]) (logid:49586a24) Skipping delivering event Event {"description":"{\"details\":\" Name: account.cleanup.interval New Value: 86400\",\"event\":\"CONFIGURATION.VALUE.EDIT\",\"status\":\"Completed\"}","eventId":null,"eventType":"CONFIGURATION.VALUE.EDIT","eventUuid":null,"resourceType":"Configuration","resourceUUID":null} to any webhook as account ID is missing
Description
This PR handles 5th scenario mentioned in #6880
During reset and update configuration, system will log existing and incoming value.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?